import * as Cesium from "cesium"

export interface MeasureStyle {
  polygon?: Cesium.PolygonGraphics.ConstructorOptions
  polyline?: Cesium.PolylineGraphics.ConstructorOptions
  point?: Cesium.PointGraphics.ConstructorOptions
  label?: Cesium.LabelGraphics.ConstructorOptions
  heightLightPoint?: Cesium.PointGraphics.ConstructorOptions
}
export const defaultStyle: MeasureStyle = {
  polygon: {
    fill: true,
    material: Cesium.Color.ORANGE.withAlpha(0.5),
    perPositionHeight: true,
  },
  polyline: {
    width: 5,
    material: Cesium.Color.ORANGE,
    depthFailMaterial: Cesium.Color.RED,
    clampToGround: false,
  },
  label: {
    font: "16px",
    disableDepthTestDistance: Number.MAX_VALUE,
    backgroundColor: Cesium.Color.BLACK.withAlpha(0.7),
    backgroundPadding: new Cesium.Cartesian2(7, 5),
    showBackground: true,
  },
  point: {
    pixelSize: 5,
    color: Cesium.Color.WHITE,
    outlineWidth: 3,
    outlineColor: Cesium.Color.ORANGE,
    disableDepthTestDistance: Number.MAX_VALUE,
  },
  heightLightPoint: {
    pixelSize: 5,
    color: Cesium.Color.WHITE,
    outlineWidth: 6,
    outlineColor: Cesium.Color.fromCssColorString("#fe6600").withAlpha(0.8),
    disableDepthTestDistance: Number.MAX_VALUE,
  },
}
